package com.example.back.service;

import com.example.back.entity.Notice;
import com.example.back.mapper.NoticeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.ArrayList;

@Service
public class NoticeService {
    @Autowired
    private NoticeMapper noticeMapper;

    public int addNotice(Notice notice){
        return noticeMapper.addNotice(notice);
    }

    public int deleteNotice(Serializable id){
        return noticeMapper.deleteNotice(id);
    }

    public int updateNotice(Notice notice){
        return noticeMapper.updateNotice(notice);
    }

    public Notice selectNoticeById(Serializable id){
        return noticeMapper.selectNoticeById(id);
    }

    public ArrayList<Notice> selectNotice(Notice notice){
        return noticeMapper.selectNotice(notice);
    }
}
